<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="PulseActivity,com.flashsim.FStEng.Three.PulseActivity,TICK,frameBased,handler,intvl" name="keywords">
<title>com.flashsim.FStEng.Three.PulseActivity</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'PulseActivity - API Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Flash State Engine, version 3.0</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/flashsim/FStEng/Three/PulseActivity.html&amp;com/flashsim/FStEng/Three/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;PulseActivity</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class PulseActivity"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.flashsim.FStEng.Three</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class PulseActivity</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">PulseActivity <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
</table>
<p></p>
  Time-based or frame-based state activity.
  <p>A pulse activity is an action that gets triggered at some time- or frame-based interval while a
  state is active.  Like transitions, developers use a State's <code>addPulseActivity</code> to attach
  a pulse activity to a given State.</p>
  When you create a pulse activity, you tell the constructor whether you want to invoke the action (function)
  at an interval of milliseconds or of number of frames elapsed.
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#frameBased">frameBased</a> : Boolean<div class="summaryTableDescription">
   Frame-based or time-based.</div>
</td><td class="summaryTableOwnerCol">PulseActivity</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#handler">handler</a> : Function<div class="summaryTableDescription">
   Handler routine for this pulse activity.</div>
</td><td class="summaryTableOwnerCol">PulseActivity</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#intvl">intvl</a> : uint<div class="summaryTableDescription">
   Interval of pulse.</div>
</td><td class="summaryTableOwnerCol">PulseActivity</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#PulseActivity()">PulseActivity</a>(interval:uint, origState:<a href="State.html">State</a>, cb:Function, fb:Boolean = false)</div>
<div class="summaryTableDescription">
   Creates an instance of a Pulse Activity.</div>
</td><td class="summaryTableOwnerCol">PulseActivity</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#TICK">TICK</a> : String = "TICK"<div class="summaryTableDescription">[static]
   Event sent on each pulse of the activity.</div>
</td><td class="summaryTableOwnerCol">PulseActivity</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="frameBased"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">frameBased</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var frameBased:Boolean</code><p>
   Frame-based or time-based.
   </p><p>Boolean value indicating true: pulse activity is frame-based, or false: pulse activity is time-based.</p>
   <p>The default value is <code>false</code>.</p>
</div>
<a name="handler"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">handler</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var handler:Function</code><p>
   Handler routine for this pulse activity.
   </p></div>
<a name="intvl"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">intvl</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var intvl:uint</code><p>
   Interval of pulse.
   </p><p>Interval is in milliseconds if pulse activity is time-based, or is in number of frames if frame-based.</p>
   </div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="PulseActivity()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">PulseActivity</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function PulseActivity(interval:uint, origState:<a href="State.html">State</a>, cb:Function, fb:Boolean = false)</code><p>
   Creates an instance of a Pulse Activity.
   </p><p>Pulse Activities are time- or frame-based triggered actions that do not cause state changes (unless the
   developer invokes a transition during the handling of the pulse.  Developers send in the handler function to
   the State's pulse activity creator, <code>myStatePtr.addPulseActivity()</code>.</p>
   <p>When a tick is generated, the handler receives an <code>EventWithData</code> that has 1 property, <code>event.data.state</code>.
   This allows the handler to tell which state originated this pulse activity.</p>
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">interval</span>:uint</code> &mdash; For time-based activities (the default), use milliseconds.  For frame-based activities, use number of frames.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">origState</span>:<a href="State.html">State</a></code> &mdash; A pointer to the state on which the activity is defined.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">cb</span>:Function</code> &mdash;   Callback function for event handler.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">fb</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash;   Boolean value that is true for frame-based pulses, or false (default) for time-based.
   </td>
</tr>
</table>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="TICK"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">TICK</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const TICK:String = "TICK"</code><p>
   Event sent on each pulse of the activity.
   </p><p>The developer tells the pulse activity how frequently to emit pulses.  When the time elapses, the engine
   generates a TICK event that callers can register to listen for.</p>
   </div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
